#pragma once
#include "Entity.h"
#include "MGlobalDef.h"
#include <array>

namespace mgl{

struct KDInter : public Entity{

	KDInter(const std::array<float, 6>& arr);
	KDInter(){ m_type = Cube; }

	void testData();

	void createBuffer() override;
	void releaseBuffer() override;
	void draw() const override;

	void drawCube()const;
	void drawWire()const;

	enum Type : unsigned char{ Cube, Wire, };

	void setType(Type type){ m_type = type; }

private:

	float& vertex(int i, int c){ return m_vBuffer[i*3+c]; }



	float				m_vBuffer[24];
	uint				m_vBufferId;
	const static uint	g_iBufferCube[];
	const static uint	g_iBufferWire[];
	static uint			g_iBufferIdCube;
	static uint			g_iBufferIdWire;

	Type				m_type;

};

}